package ${cfg.voPath};

import java.util.Date;
import java.math.BigDecimal;
import java.io.Serializable;
import com.book.common.util.DatetimeUtil;
import lombok.Data;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * Description：${table.comment!} Vo
 * @Author： ${author}
 * @CreateDate： ${date}
 * @Email： ${cfg.email}
 * Version: ${cfg.version}
 */
@Data
@ExcelTarget("${table.entityPath}Vo")
@ApiModel(value = "${table.entityName}Vo", discriminator = "${table.comment!}Vo", subTypes = {${table.entityName}Vo.class})
public class ${table.entityName}Vo implements Serializable {
<#if entitySerialVersionUID>
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value="主键ID")
    private Long id;

</#if>
<#-- ----------  BEGIN 字段循环遍历  ---------->
<#list table.fields as field>
    <#if field.propertyName!="id" && field.propertyName!="status" && field.propertyName!="version" && field.propertyName!="remarks" && field.propertyName!="createBy" && field.propertyName!="createDate" && field.propertyName!="createName"  && field.propertyName!="updateName" && field.propertyName!="updateBy" && field.propertyName!="updateDate">
    @ApiModelProperty(value = "${field.comment}")
        <#if field.propertyType == "LocalDateTime">
    @JsonFormat(pattern = DatetimeUtil.YYYY_MM_DD_HH_MM_SS_L_C,timezone=DatetimeUtil.CHINA_TIME_ZONE)
    @Excel(name = "${field.comment}", databaseFormat = DatetimeUtil.YYYY_MM_DD_HH_MM_SS_L_C, format = DatetimeUtil.YYYY_MM_DD_HH_MM_SS_L_C, isImportField = "true_st", width = 20)
    private Date ${field.propertyName};

        <#elseif field.type == "decimal" || field.type == "numeric">
    @Excel(name = "${field.comment}", width = 30, isImportField = "true_st")
    private BigDecimal ${field.propertyName};

        <#else>
    @Excel(name = "${field.comment}", width = 30, isImportField = "true_st")
    private ${field.propertyType} ${field.propertyName};

        </#if>
     <#elseif field.propertyName!="id" && field.propertyName!="status" && field.propertyName!="version">
    @ApiModelProperty(value = "${field.comment}")
         <#if field.propertyType == "LocalDateTime">
    @JsonFormat(pattern = DatetimeUtil.YYYY_MM_DD_HH_MM_SS_L_C,timezone=DatetimeUtil.CHINA_TIME_ZONE)
    private Date ${field.propertyName};

         <#elseif field.type == "decimal" || field.type == "numeric">
    private BigDecimal ${field.propertyName};

         <#else>
    private ${field.propertyType} ${field.propertyName};

         </#if>
     </#if>
</#list>
}
